<?php get_header();?>
	<div id="content">
      <?php if (have_posts()) {?>
     <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
    
    <?php /* If this is a category archive */ if (is_category()) { ?>				
		<h2 class="pagetitle">Posts from the '<?php echo single_cat_title(); ?>' Category</h2>
    
    <?php /* If this is a Tag archive */ } elseif (function_exists('is_tag')&& is_tag()) { ?>
    <h2 class="pagetitle">
      Posts with the Tag '<?php echo single_tag_title(); ?>'
    </h2>
 	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
		<h2 class="pagetitle">Posted on <?php the_time('F jS, Y'); ?></h2>
		
	 <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
		<h2 class="pagetitle">Posted in <?php the_time('F, Y'); ?></h2>

		<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
		<h2 class="pagetitle">Posted in <?php the_time('Y'); ?></h2>
		
		<?php /* If this is a paged archive */ } elseif (is_paged()) { ?>
		<h2 class="pagetitle">Posts from the past</h2>
		<?php }?>
		<?php }?>
		<?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
      <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <div class="titlearea">
        <h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
      </div>
      <div class="entry">
				<?php the_excerpt(); ?>        
       </div>
			<div class="meta">
        <p class="byline">
          <?php the_author_posts_link();?> wrote this on <?php the_time('M d Y');?>
        </p>
				<p class="links">
					 <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">Read Full Post &#187;</a>
				</p>
			</div>
    </div>
      <?php endwhile; ?>
     	<?php else : ?>
				<h2 class="center">Not Found</h2>
				<p class="center">Sorry, but you are looking for something that isn't here.</p>
			<?php endif; ?>
			<div class="clear"></div>
      <p align="center">
        <?php posts_nav_link(' - ','&#171; Newer Entries','Older Entries &#187;') ?>
      </p>
	</div>
  <?php get_sidebar();?>
  <?php get_footer();?>